-- GENERATED SPELL FOR [Eykenen] --


function spell0_21709(pUnit, Event) --@Earth Shield,n/a--
pUnit:FullCastSpellOnTarget(32734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21709', 635, 1)
end

function spell1_21709(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(13281,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21709', 2320, 1)
end

function Sorts_21709(pUnit, Event)
local choix_sorts_21709 = math.random(0, 1)
if choix_sorts_21709 == 0 then
pUnit:RegisterEvent('spell0_21709', 1, 1)
end
if choix_sorts_21709 == 1 then
pUnit:RegisterEvent('spell1_21709', 1, 1)
end
end

function mob21709_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21709', math.random(1500, 3000), 1)
end

function mob21709_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21709_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21709_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21709, 1, 'mob21709_Action')
RegisterUnitEvent(21709, 2, 'mob21709_Leave')
RegisterUnitEvent(21709, 3, 'mob21709_Kill')
RegisterUnitEvent(21709, 4, 'mob21709_Die')
